{"ast":null,"code":"import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"children\"];\nimport * as React from 'react';\nimport useMemo from \"rc-util/es/hooks/useMemo\";\nimport isEqual from \"rc-util/es/isEqual\";\nimport CacheEntity from \"./Cache\";\nexport var ATTR_TOKEN = 'data-token-hash';\nexport var ATTR_MARK = 'data-css-hash';\nexport var ATTR_DEV_CACHE_PATH = 'data-dev-cache-path'; // Mark css-in-js instance in style element\n\nexport var CSS_IN_JS_INSTANCE = '__cssinjs_instance__';\nexport var CSS_IN_JS_INSTANCE_ID = Math.random().toString(12).slice(2);\nexport function createCache() {\n  if (typeof document !== 'undefined' && document.head && document.body) {\n    var styles = document.body.querySelectorAll(\"style[\".concat(ATTR_MARK, \"]\")) || [];\n    var firstChild = document.head.firstChild;\n    Array.from(styles).forEach(function (style) {\n      style[CSS_IN_JS_INSTANCE] = style[CSS_IN_JS_INSTANCE] || CSS_IN_JS_INSTANCE_ID; // Not force move if no head\n\n      document.head.insertBefore(style, firstChild);\n    }); // Deduplicate of moved styles\n\n    var styleHash = {};\n    Array.from(document.querySelectorAll(\"style[\".concat(ATTR_MARK, \"]\"))).forEach(function (style) {\n      var hash = style.getAttribute(ATTR_MARK);\n      if (styleHash[hash]) {\n        if (style[CSS_IN_JS_INSTANCE] === CSS_IN_JS_INSTANCE_ID) {\n          var _style$parentNode;\n          (_style$parentNode = style.parentNode) === null || _style$parentNode === void 0 ? void 0 : _style$parentNode.removeChild(style);\n        }\n      } else {\n        styleHash[hash] = true;\n      }\n    });\n  }\n  return new CacheEntity();\n}\nvar StyleContext = /*#__PURE__*/React.createContext({\n  hashPriority: 'low',\n  cache: createCache(),\n  defaultCache: true\n});\nexport var StyleProvider = function StyleProvider(props) {\n  var children = props.children,\n    restProps = _objectWithoutProperties(props, _excluded);\n  var parentContext = React.useContext(StyleContext);\n  var context = useMemo(function () {\n    var mergedContext = _objectSpread({}, parentContext);\n    Object.keys(restProps).forEach(function (key) {\n      var value = restProps[key];\n      if (restProps[key] !== undefined) {\n        mergedContext[key] = value;\n      }\n    });\n    var cache = restProps.cache;\n    mergedContext.cache = mergedContext.cache || createCache();\n    mergedContext.defaultCache = !cache && parentContext.defaultCache;\n    return mergedContext;\n  }, [parentContext, restProps], function (prev, next) {\n    return !isEqual(prev[0], next[0], true) || !isEqual(prev[1], next[1], true);\n  });\n  return /*#__PURE__*/React.createElement(StyleContext.Provider, {\n    value: context\n  }, children);\n};\nexport default StyleContext;","map":{"version":3,"names":["_objectSpread","_objectWithoutProperties","_excluded","React","useMemo","isEqual","CacheEntity","ATTR_TOKEN","ATTR_MARK","ATTR_DEV_CACHE_PATH","CSS_IN_JS_INSTANCE","CSS_IN_JS_INSTANCE_ID","Math","random","toString","slice","createCache","document","head","body","styles","querySelectorAll","concat","firstChild","Array","from","forEach","style","insertBefore","styleHash","hash","getAttribute","_style$parentNode","parentNode","removeChild","StyleContext","createContext","hashPriority","cache","defaultCache","StyleProvider","props","children","restProps","parentContext","useContext","context","mergedContext","Object","keys","key","value","undefined","prev","next","createElement","Provider"],"sources":["/data/messenger.client/node_modules/@ant-design/cssinjs/es/StyleContext.js"],"sourcesContent":["import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"children\"];\nimport * as React from 'react';\nimport useMemo from \"rc-util/es/hooks/useMemo\";\nimport isEqual from \"rc-util/es/isEqual\";\nimport CacheEntity from \"./Cache\";\nexport var ATTR_TOKEN = 'data-token-hash';\nexport var ATTR_MARK = 'data-css-hash';\nexport var ATTR_DEV_CACHE_PATH = 'data-dev-cache-path'; // Mark css-in-js instance in style element\n\nexport var CSS_IN_JS_INSTANCE = '__cssinjs_instance__';\nexport var CSS_IN_JS_INSTANCE_ID = Math.random().toString(12).slice(2);\nexport function createCache() {\n  if (typeof document !== 'undefined' && document.head && document.body) {\n    var styles = document.body.querySelectorAll(\"style[\".concat(ATTR_MARK, \"]\")) || [];\n    var firstChild = document.head.firstChild;\n    Array.from(styles).forEach(function (style) {\n      style[CSS_IN_JS_INSTANCE] = style[CSS_IN_JS_INSTANCE] || CSS_IN_JS_INSTANCE_ID; // Not force move if no head\n\n      document.head.insertBefore(style, firstChild);\n    }); // Deduplicate of moved styles\n\n    var styleHash = {};\n    Array.from(document.querySelectorAll(\"style[\".concat(ATTR_MARK, \"]\"))).forEach(function (style) {\n      var hash = style.getAttribute(ATTR_MARK);\n\n      if (styleHash[hash]) {\n        if (style[CSS_IN_JS_INSTANCE] === CSS_IN_JS_INSTANCE_ID) {\n          var _style$parentNode;\n\n          (_style$parentNode = style.parentNode) === null || _style$parentNode === void 0 ? void 0 : _style$parentNode.removeChild(style);\n        }\n      } else {\n        styleHash[hash] = true;\n      }\n    });\n  }\n\n  return new CacheEntity();\n}\nvar StyleContext = /*#__PURE__*/React.createContext({\n  hashPriority: 'low',\n  cache: createCache(),\n  defaultCache: true\n});\nexport var StyleProvider = function StyleProvider(props) {\n  var children = props.children,\n      restProps = _objectWithoutProperties(props, _excluded);\n\n  var parentContext = React.useContext(StyleContext);\n  var context = useMemo(function () {\n    var mergedContext = _objectSpread({}, parentContext);\n\n    Object.keys(restProps).forEach(function (key) {\n      var value = restProps[key];\n\n      if (restProps[key] !== undefined) {\n        mergedContext[key] = value;\n      }\n    });\n    var cache = restProps.cache;\n    mergedContext.cache = mergedContext.cache || createCache();\n    mergedContext.defaultCache = !cache && parentContext.defaultCache;\n    return mergedContext;\n  }, [parentContext, restProps], function (prev, next) {\n    return !isEqual(prev[0], next[0], true) || !isEqual(prev[1], next[1], true);\n  });\n  return /*#__PURE__*/React.createElement(StyleContext.Provider, {\n    value: context\n  }, children);\n};\nexport default StyleContext;"],"mappings":"AAAA,OAAOA,aAAa,MAAM,0CAA0C;AACpE,OAAOC,wBAAwB,MAAM,oDAAoD;AACzF,IAAIC,SAAS,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